<html>
<head>
<title>Content Management System - Met CS 633 Distributed Software Development Class</title>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<link href="css/cms.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="820px" align="center">
	<tr>
		<td><img src="images/top.jpg" width="820px" height="20px" alt="CMS"></td>
	</tr>
	<tr>
		<td>
			<table cellpadding="2" cellspacing="2" width="99%" class="box_gray" align="center">
				<TR>
					<TD background="images/menu.bg.jpg" class="cmstitle" align="center">MET CS 633 Distributed Software Development Content Management System</TD>
				</TR>
				<tr>
					<td class="contentheader1">Edit Food</td>
				</tr>
				<tr>
					<td>
						<table align="center" cellpadding="2" cellspacing="2" width="99%">
						<form method="POST" action="cms_update_food.php?action=edit" name="food">
							<input type="hidden" name="food_id" value="<?=$food_id?>">
							<tr bgcolor="#436183" "#000066" "CCCDEB" class="cmstable">
								<td colspan="5" align="center">NUTRITION INFORMATION </td>
							</tr>
							<tr class="content">
								<td align="right">Food Name: </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["food_name"]?>" name="food_name"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Food Group:</td>
								<td align="left">
									<select class="dropdown" name="cat_id">
										<option value=""></option>
										<? foreach ($cat_array as $cat) {?>
										<option <? if ($food["cat_id"] == $cat["cat_id"]) {?>selected<?}?> value="<?=$cat["cat_id"]?>"><?=$cat["cat_descr"]?></option>
										<? } ?>
									</select>
								</td>
							</tr>
							<tr class="content">
								<td align="right">Serving Size Desc1: </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["gmwt_desc1"]?>" name="gmwt_desc1"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Serving Weight1:</td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["gmwt1"]?>" name="gmwt1"></td>
							</tr>
							<tr class="content">
								<td align="right">Serving Size Desc2: </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["gmwt_desc2"]?>" name="gmwt_desc2"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Serving Weight2:</td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["gmwt2"]?>" name="gmwt2"></td>
							</tr>
							<tr class="content">
								<td align="right">Calories (per kcal): </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["calories"]?>" name="calories"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Saturated Fat (per gm):</td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["saturated_fat"]?>" name="saturated_fat"></td>
							</tr>
							<tr class="content">
								<td align="right">Trans Fat (per gm): </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["trans_fat"]?>" name="trans_fat"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Carbohydrates (per gm):</td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["carbohydrates"]?>" name="carbohydrates"></td>
							</tr>
							<tr class="content">
								<td align="right">Dietary Fiber (per gm): </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["dietary_fiber"]?>" name="dietary_fiber"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Sugar (per gm):</td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["sugar"]?>" name="sugar"></td>
							</tr>
							<tr class="content">
								<td align="right">Protein (per gm): </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["protein"]?>" name="protein"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Cholesterol (per mg):</td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["cholesterol"]?>" name="cholesterol"></td>
							</tr>
							<tr class="content">
								<td align="right">Sodium (per mg): </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["sodium"]?>" name="sodium"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Iron (per mg):</td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["iron"]?>" name="iron"></td>
							</tr>
							<tr class="content">
								<td align="right">Vitamin C (per mg): </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["vitc"]?>" name="vitc"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Vitamin B6 (per mg):</td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["vitb6"]?>" name="vitb6"></td>
							</tr>
							<tr class="content">
								<td align="right">Calcium (per mg): </td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["calcium"]?>" name="calcium"></td>
								<td><img src="images/spacer.gif" width="5"></td>
								<td align="right">Vitamin A (per IU):</td>
								<td align="left"><input type="text" class="shadeform" value="<?=$food["vita_ui"]?>" name="vita_ui"></td>
							</tr>
							<tr class="content">
								<td colspan="5"><img src="images/spacer.gif" height="10"></td>
							</tr>
							<tr class="content">
								<td colspan="5" align="center"><input type="submit" value="Update" name="submit" onmouseover="this.className='submitbuttonon'" onmouseout="this.className='submitbutton'" class="submitbutton"></td>
							</tr>
						</form>
						</table>
					</td>
				</tr>
				<tr>
					<td><img src="images/spacer.gif" height="10"></td>
				</tr>
				<tr>
					<td><a href="cms_main.php" class="content">Return to CMS Home</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="main.php" class="content">Exit CMS</td>
				</tr>
			</table>

		</td>
	</tr>

	<tr>
		<td><img src="images/spacer.gif" width=29 height=10 alt=""></td>
	</tr>
</table>
</body>
</html>